import type { MockMethod } from 'vite-plugin-mock';

const mockData: MockMethod[] = [
    {
        url: '/Auth/index',
        method: 'get',
        response: ({ query }) => {
            return {
                "code": 1,
                "msg": "操作成功",
                "data": {
                    "list": [
                        {
                            "id": 1,
                            "name": "测试组",
                            "description": "测试测试",
                            "status": 1
                        }
                    ],
                    "count": 1
                }
            };
        },
    },
    {
        url: '/Log/index',
        method: 'get',
        response: ({ query }) => {
            return {
                "code": 1,
                "msg": "操作成功",
                "data": {
                    "list": [
                        {
                            "id": 190,
                            "action_name": "获取操作日志列表",
                            "uid": 1,
                            "nickname": "root1",
                            "add_time": 1634894708,
                            "data": "{\"page\":\"1\",\"size\":\"10\",\"type\":\"\",\"keywords\":\"\"}",
                            "url": "admin\/Log\/index"
                        }
                    ],
                    "count": 190
                }
            };
        },
    },
    {
        url: '/Log/del',
        method: 'get',
        response: ({ id }) => {
            return {
                "code": 1,
                "msg": "操作成功",
                "data": []
            };
        },
    }
];

export default mockData;